package com.yenlien.traceyun.admin.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: bigwangy@sina.com
 * @create: 2020-03-04
 * @description:
 **/

@RestController
@RequestMapping("config")
@RefreshScope
public class TestNacosController {

    @Value("${a.test1:test1}")
    private String test1;

    @Value("${a.test2:test2}")
    private String test2;

    @RequestMapping(value = "/get", method = RequestMethod.GET)
    @ResponseBody
    public Object get() {
        return "test1:" + test1 + "   test2:" + test2;
    }

}
